package com.systop.listener;

// import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.rabbit.support.CorrelationData;
import org.springframework.context.annotation.Bean;

/**
 * @Description: TODO
 * @Author: jsj
 * @Date: 2023/3/22
 */
public class CallBackMQ implements RabbitTemplate.ConfirmCallback {
    @Override
    public void confirm(CorrelationData correlationData, boolean b, String s) {
        if (b) {
            //设置消息投递成功
            System.out.println("消息投递成功");
        } else {
            //消息投递失败
            System.out.println("消息投递失败");
        }
    }
}